<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
    import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div>insert into guestbook (context) values (1, 'hi');</div>
	<table border="1">
	<tr>
		<td>글번호 </td>
		<td>컨텐트</td>
	</tr>
<%
	Connection con = mysql.Connect.getConnection();
	java.util.ArrayList<model.GuestBook> list = mysql.Query.selectAll(con);
	
	for(model.GuestBook gb : list){
%>
	<tr>
		<td><%=gb.num %></td>
		<td><%=gb.content %></td>
	</tr>
<%	
	}
%>
</table>

	<form action="insertGuestBook.jsp">
		글남기기 <textarea rows="3" cols="80" name="content"></textarea>
		<input type="submit">	
	</form>


</body>
</html>